package com.modai.springcloud.service;

import com.modai.springcloud.service.impl.HystrixOrderServiceFallback;
import com.netflix.hystrix.contrib.javanica.annotation.DefaultProperties;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author ：modai
 * @date ：Created in 2020-12-7 20:06
 * @description：
 */
@Service
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT",fallback = HystrixOrderServiceFallback.class)
public interface HystrixOrderService {

    @GetMapping("/payment/hystrix/ok/{id}")
    String responseOk(@PathVariable("id") int id);

    @GetMapping("/payment/hystrix/timeout/{id}")
    String responseTimeout(@PathVariable("id") int id);
}
